package model.banco;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConexaoFactory {

	private static ConexaoFactory instance;

	public static ConexaoFactory getInstance() {
		if (instance == null)
			instance = new ConexaoFactory();
		return instance;
	}

	private ConexaoFactory() {
	}

	public Connection getConnection() {
		try {
			return DriverManager.getConnection(
					"jdbc:postgresql://localhost:5432/postgres/public",
					"postgres", "root");
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}

}
